#ifndef Sprite_h
#define Sprite_h

#include <d3d9.h>
#include <d3dx9.h>
#include "Texture.h"
#include "ViewPort.h"

class Sprite
{
protected:

	LPD3DXSPRITE _SpriteHandler;
	Texture *_Texture;
	float _Width;
	float _Height;
	int _Index;
	int _SpritePerRow;
	int _StartIndex;
	
public:
	//for upper layer object
	Sprite(LPD3DXSPRITE SpriteHandler, Texture *texture, float Width, float Height, int SpritePerRow , int StartIndex);
	
	~Sprite(void);
	void Render(LPDIRECT3DSURFACE9 Target, int x, int y, int alpha, float xScale, float yScale, ViewPort *viewport);

	float GetWidth();
	float GetHeight();
};

#endif